BTW, there are no code bugs, the fixes above are typo mistakes I made with code to look for, an extra " or an added word, but the added code is correct.
When looking for the bad typo ~; } # end mods column
$Top .= "
$newslinefader";
Replace that code with: ~; } # end mods column
$Top .= "$newslinefader";
(Which sould be)
look for: ~; } # end mods column
and add after: $Top .= "$newslinefader";
If you were to search through the script for ~; } # end mods column you will find there is two of them, one a bit further down, now are adding $Top .= "$newslinefader"; to the wrong line? If so then this could be the bug, il try it and il let you know...
*EDIT* I was going to the first instance of } # end mods column
when you have to go to the second one. Maybe you should write that in the page so people don't get mixed up ^^;;. Well anyways thanx for your help everyone, eventhough I made a boo-boo . I should've searched more carefully.
[ March 22, 2001: Message edited by: M_E_W ]
//i wanna scream, show the world i have an inside. i wanna bleed, let the blood flow, that keeps me alive.
decimator - yes it is in two different places, BUT the next line is the key. You want the one that starts with $Top not $Row, as is properly documented.
This hack will fade in news headlines that you dictate via the control panel in a table row above your forums. If you are curious how it looks, visit my forums at http://www.vhforums.com for an example.
This is a pretty extensive hack, so make sure and back up all your files first BEFORE making any changes.
First thing is to upload the contents of this zip file to the following folders: fade.gif -> To your non-cgi folder fader.js -> To your non-cgi folder newsfader.txt -> To your non-cgi folder cp_vars_news_fader_.pl -> To your Templates directory cp_news_fader.cgi -> To your cgi-bin folder (CHMOD this file 755) vars_news_fader.cgi -> To your variables folder (most likely your cgi-bin folder)- CHMOD this file 777
Ok next the files that need to be edited:
** EDIT CP.CGI **
Look for the following code: if (($ubb eq "set_cats") && ($status eq "Administrator")) { require "$vars_config{CGIPath}/cp_forums.cgi"; &set_cats; exit; } #end set_cats
Underneath this add: if (($ubb eq "vars_news_fader") && ($status eq "Administrator")) { require "$vars_config{CGIPath}/cp_news_fader.cgi"; &NewsFaderSettings; exit; } #end vars_news_fader
Underneath that add this: # Start News Fader Stuff if ($vars_news_fader{nfgreet} ne "") { $NewsGreet = qq~"$vars_news_fader{nfgreet}","",~; } else { $NewsGreet = ""; }
if ($vars_news_fader{nfon} eq "ON") { $newslinefader= qq~
$vars_news_fader{nftitle}
News Fader for DHTML Browser.
~; } else { $newslinefader = ""; }
# Run The News Fader &ReadNews;
# End News Fader Stuff
Look for: sub Normal_Table_Row { my $Row = qq~
Underneath add the following:
Look for: ~; } # end mods column
$Top .= '
';
return ($Top); } #end normal_table_top
sub Cat_Table_Top {
Replace with:
~; } # end mods column $Top .= "
$newslinefader";
$Top .= '';
return ($Top); } #end normal_table_top
sub Cat_Table_Top
{** DONE - SAVE AND CLOSE PUBLIC_FORUM_SUMMARY.PL TEMPLATE **
Ok now you're done. Re-upload these four files. Next go into the Control Panel, Primary Settings -> News Fader Settings, configure all of your settings and news headlines. Clear your cache and the next time you view your forum summary page, the News Fader should be there.
[Fixed typo error in cp_news_fader.cgi] [Fixed the edits in PUBLIC_FORUM_SUMMARY.PL]
Guys I have fixed all my typos and added some new code to cp_news_fader.cgi per qasic's suggestions. Now the code you have now will work fine, but if you want the cache to clear out after every News Fader update you make and have the code version number on the script, download the new 1.2 version here. I will also alter my first post so that people can download 1.2 there as well. You guys gotta remember this is BETA, that's why it's in this forum. I appreciate people catching some of the silly typos.
I WAS WONDERING IF ITS POSSIBLE IF I ALREADY HAVE THE NEWS FADER INSTALLED AND I WANTED TO INSTALL IT AGAIN BUT I ONLY WANTED TO USE THIS ONE FOR WHEN I SHURE THE BOARD DOWN AND PEEP WANTED TO NOO WHY IN GOOD STYLE
well i have the same all installed and dubbelchecked and in the cp turned on but no newsfader, did download the 1.2 version and reinstall it again and still no newsfader only what is working is the cp control , so it's strange..
Well I always loved this hack. But it causes IE to shut down. If I turn it off no problem. Turn it on and IE 5.5 shuts down. Anyone else with this problem? I see it working on other boards.
look good what version you are using the 6.0 or the 6.01 i did install the version 4 6.01 op a 6.0 and that did not work 4 me, and ya , just see if you did not forget annything
1e adjust the news settings and then clear cache ( very importend )
Looks good Jigga, I just made a couple changes to make sure people now this is Version 1.3 on the readme.txt file. So I've uploaded 1.3 to my server too.
Cool, it is showing up now, but of course one hitch..... All changes happen, except the actual news text itself... I'm sure I can write my own txt file, no problem, but any ideas why the news updates done in the CP don't show up?
At school and on a Mac right now so I can't test but I think that JM's 1.3 hack had extra text along the lines of "DHTML Javascript Fader" or something that could be removed from the install docs to save space?
Great hack!. Do you plan on including upgrade documents in your hacks? It is hard to find the right code to change because in your install file, you list the default code. Those of us who already have 1.2 have to go back and compare the install from 1.2 and 1.3 to make sure we don't miss anything, or change anything that isn't supposed to be changed. Just a suggesion.... thanks..
Nah that's always been there, I believe it is there to show something when someone doesn't have javascript enabled, I could be wrong though. Qasic, you are able to see the Fader using a Mac with IE 5.5?? Some people reported problems with that on my site. Can you see mine?
Acid box, yes I will include some an upgrade.txt script to point out the changes from 1.2 to 1.3. If you want to hang back a few, I can redo the zip with upgrade directions.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.